﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotNet.Random.Abstract
{
    /// <summary>
    /// string类型 rand 抽象类 主要用于随机string类型的基类，实现了IStringRandService接口
    /// </summary>
    public abstract class StringAbsRandService : DotNet.Random.Interface.IStringRandService
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="StringAbsRandService" /> class.
        /// </summary>
        public StringAbsRandService()
        {
            this.Build = new BuildRandService();
            this.Serial = new List<string>();
        }

        /// <summary>
        /// Gets or sets the serial.
        /// 序列组
        /// </summary>
        /// <value>
        /// The serial.
        /// </value>
        public IList<string> Serial { get; set; }

        /// <summary>
        /// Gets or sets the build.
        /// 选取序列属性
        /// </summary>
        /// <value>
        /// The build.
        /// </value>
        protected BuildRandService Build { get; set; }

        /// <summary>
        /// Rands this instance.
        /// 随机生成字符串方法
        /// 映射到虚方法中，扩展时，可重写
        /// </summary>
        /// <returns>
        /// 返回字符串类型
        /// </returns>
        public abstract string Rand();
    }
}
